package LeetCode;

public class LC_104_MaximumDepthofBinaryTree {
    public static void main(String[] args) {

    }

    class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        TreeNode(int x) {
            val = x;
        }
    }

    static class Solution {
        private int maxDepth(TreeNode root) {
            return root == null ? 0 : (1 + Math.max(maxDepth(root.left), maxDepth(root.right)));
        }
    }

}
